package com.imoocdl.service;

import com.imoocdl.dto.OrderDtDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by pc on 2018/3/31.
 */

public interface OrderService {
    /**
     * 创建订单
     */
    OrderDtDTO create(OrderDtDTO orderDtDTO);

    /**
     * 查询单个
     * @param orderId
     * @return
     */
    OrderDtDTO findOne(String orderId);

    /**
     * 查询买家列表
     * @param buyerOpenid
     * @param pageable
     * @return
     */
    Page<OrderDtDTO> findList(String buyerOpenid, Pageable pageable);

    /**
     * 取消订单
     *
     * @param orderDtDTO
     * @return
     */
    OrderDtDTO cancel(OrderDtDTO orderDtDTO);

    /**
     * 完结订单
     */

    OrderDtDTO finish(OrderDtDTO orderDtDTO);

    /**
     * 支付订单
     */
    OrderDtDTO paid(OrderDtDTO orderDtDTO);
    /**
     * 查询订单列表
     */
    Page<OrderDtDTO> findList(Pageable pageable);
}
